home *** CD-ROM | disk | FTP | other *** search
- /* keyio2.c - keyflush() and waitcr() functions */
- /* system-independant part of the keyboard input module */
-
- #include "stdio.h"
- #include "keyio.h"
-
- int keyflush() /* discard any waiting console input */
- {
- /* repeat */
- while( keypress() != 0 ) /* check for input */
- { getkey() ; } /* and discard if found */
- }
-
- int waitcr() /* wait until a CR is typed */
- {
- while( getkey() != '\r' ) /* discard input until CR found */
- { ; }
- }
-
-
-